﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wwtfly.BBS.BackModels.Models.PlaysType;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data.Common;
using System.Data;
using Wwtfly.DBUtility;

namespace Wwtfly.BBS.BackDAL.Plays
{
   public class PlaysTypesDAL
    {
        /// <summary>
        /// 根据ID查询
        /// </summary>
       public static readonly string PlayTypes_Select = "SELECT Id, LotteryID, LotteryName, Descrition  FROM  pm_T_LotteryType ";

        /// <summary>
        /// 分页 获取 彩种类型
        /// </summary>
        /// <returns>List LotteryShowsType</returns>
       public static IList<LotteryType> GetPlaysTypesList()
        {
            Database db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(PlayTypes_Select);
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                return Emit.ConvertToList<LotteryType>(dr);
            }
        }
 
    }
}
